#define _CRT_SECURE_NO_WARNINGS 1
#include"string.h"
namespace sty
{
	void text1()
	{
		string s1("hello world");
		string s2("");
		cout << s1.c_str() << endl;
		cout << s2.c_str() << endl;
		for (int i = 0; i < s1.size(); i++)
		{
			cout << s1[i];
		}
	}
	void text2()
	{
		string s1("hello world");
		string s2("");
		string::iterator it = s1.begin();
		for (auto e : s1)
		{
			cout << e;
		}
		while (it != s1.end())
		{
			cout << *it << " ";
			it++;
		}
	}
	void text3()
	{
		string s1("hello world");
		s1 += '#';
		cout << s1.c_str()<<endl;
		cout << s1.size();
	}
	void text4()
	{
		string s1("hello world");
		s1.insert(0, '*');
		cout << s1.c_str() << endl;
	}
}
int main()
{
	sty::text4();
	return 0;
}